package com.example.administrator.yiroote.fragment;


import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.administrator.yiroote.R;

/**
 * A simple {@link Fragment} subclass.
 */
public class StoreFragment extends Fragment {


    public StoreFragment() {
        // Required empty public constructor
    }
private FloatingActionButton    fab;
    private  View view;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        view= inflater.inflate(R.layout.fragment_store, container, false);
        initViews();
        initEvents();
        return view;

    }
    public void initViews(){
        fab=(FloatingActionButton)view.findViewById(R.id.fab);
    }
    public void initEvents(){
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Snackbar.make(view,"填写自己的功能！",Snackbar.LENGTH_LONG).setAction("功能！ ",null).show();

            }
        });
    }

}
